<?php
class HomeworkinfoModel extends Model
{
	public function getById($id)
	{
		$condition['Hw_id'] = $id;
		$homeworkinfo = $this->where($condition)->find();
		return $homeworkinfo;
	}
	
	public function addHomework($head, $content, $createtime, $deadline)
	{		
		$homeworkinfo['head'] = $head;
		$homeworkinfo['content'] = $content;
		$homeworkinfo['createtime'] = $createtime;
		$homeworkinfo['deadline'] = $deadline;
		return $this->add($homeworkinfo);
    }
	
	public function updateHomework()
	{
		
	}
}

?>